package com.mooc.service;


import java.util.HashMap;
import java.util.Map;

public class ServiceFactory {
    private static Map<Class, Object> serviceMap=new HashMap<>();
    static {
//        serviceMap.put(UserService.class,new UserServiceImpl());
//        serviceMap.put(Document.class,new DocumentServiceImpl());
    }
    public static <T> T getService(Class serviceClass){

        return (T) serviceMap.get(serviceClass);
    }
}
